Repository navigation
mcpx: generate the public client signature reference from source - #13701
Merged
Merged
Conversation
The public-client chapter carried a hand table of the pkg/client surface that had drifted: several ctx descriptions were stale and the receiver shapes were spelled loosely. Replace it with a generated region built from the Go AST (types, funcs and methods on exported receivers, doc-comment first paragraph as the summary), so a new, removed or reshaped exported callable drifts the committed-docs check. The renderer is deterministic and excludes unexported names, bodies, struct fields and package vars. Fixture tests pin an exact render and drive the drift table (parameter type/name, receiver, result, type params, removal, addition, type kind) and the preservation table (bodies, fields, unexported, package var). Add the doc region to the existing TestCommittedRegionsAreCurrent golden check. Add doc comments to (*ArgError).Error and (*HTTPError).Error so no generated summary is empty. Fixes #13612
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 23, 2026
… A: resolve public-client.md hand-table vs generated region, keep generated)
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the hand-written signature table in
pkgs/mcpx/docs/public-client.mdwith a region generated from thepkg/clientGo source, added to the existing committed-docs golden check.Why
The table drifted — several
ctxdescriptions were stale and the receiver shapes were spelled loosely. Generating it from source means a new, removed or reshaped exported callable drifts the check instead of the docs.Fixes #13612
How
internal/refdoc/clientsurface.go:ClientSurface(files map[string][]byte)parses the source, renders exported types, package funcs and methods on exported receivers with the doc-comment first paragraph as the summary; unexported names, bodies, struct fields and package vars are excluded; output is deterministically sorted.internal/refdoc/clientsurface_test.go: exact-render pin, drift table (parameter type/name, receiver, result, type params, removal, addition, type kind), preservation table (bodies, fields, unexported, package var), determinism.internal/refdoc/regions_test.go:public-client-signaturesregion added toTestCommittedRegionsAreCurrent.pkg/client/client.go: doc comments on(*ArgError).Errorand(*HTTPError).Errorso no summary is empty.Verification
cd pkgs/mcpx && go test ./internal/refdoc ./pkg/client -count=1(local), plus-race -shuffle=on -count=5on refdoc. Focused Fleet dispatch result recorded in the issue thread.{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T20:53:28Z", "session_id": "ses_e5df6002d55ffe0A3TqeHqMEcI", "lane": null, "host": "amd", "worktree": "/home/user/git/fleet/code-f-21410-public-client", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/fleet/code-f-21410-public-client", "repo": "developing-today/code", "branch": "queue/21410-13612-public-client-surface", "sha": "b1cb58a80e93729de7a18c1263563a9fd1d34b07" }, "auth_subject": "oc-code-05", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.